• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

144
Views
connect-history-api-fallback vs app.get('*', [callback])

When solving SPA 404 problem, nomally use connect-history-api-fallback. but I don't know advantages of using that middleware.

app.use('/api',apiRouter);
app.get('*', (req,res) => {
    res.sendFile(path.join(__dirname,'~~'))
})

It has same result. Right?

What is the advantage of using connect-history-api-fallback?

I don't know the difference. And what kind of problems it causes.

about 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error